<?php
//
defined('BY_JYA') or exit('error');
$_RQ['op']=$_RQ['op']?$_RQ['op']:'main';
$setting=$return['pluginset'];
if($_RQ['op']=='main'){
	$return['ischecklogin']=model('core/core')->checklogin('','',true);
	$this->model('member')->checkmember();
	$return['groups']=pdo_getall('jy_aihire_job_group',array('status'=>1,'uniacid'=>$_SESSION['uniacid']),array('id','title'),'','paixu desc,id desc');
	foreach($return['groups'] as &$item){
		$item['cids']=pdo_getall('jy_aihire_job_group',array('pid'=>$item['id'],'status'=>1,'uniacid'=>$_SESSION['uniacid']),array('id','title'),'','paixu desc,id desc');
	}
	$setting['bankuai1'] =  !empty($setting['bankuai1']) ? $setting['bankuai1'] : $bankuai1;
	$setting['footernav'] = !empty($setting['footernav']) ? $setting['footernav'] : $footernav;
	$return['pcd']=$this->session('pcd')?:array();
	if($return['pcd']){
		$address=$return['pcd']['province'].' '.$return['pcd']['city'];
		$code=pdo_getcolumn('core_area',array('address'=>$address),'parent_code');
	}
	$return['sharedata']=array(
		'title'=>$setting['share_title'],
		'desc'=>$setting['share_desc'],
		'link'=>custom_url('jy_aihire/list//code='.$code,true),
		'imgUrl'=>tomedia($setting['share_image']),
	);
	$sid=intval($_RQ['sid']);
	$cid=intval($_RQ['cid']);
	if($cid){
		$pid=pdo_getcolumn('jy_aihire_job_group',array('id'=>$cid,'uniacid'=>$_SESSION['uniacid']),'pid');
		$pid=pdo_getcolumn('jy_aihire_job_group',array('id'=>$pid,'uniacid'=>$_SESSION['uniacid']),'pid');
		if($pid){
			$sid=$cid;
			$cid=0;
		}
	}
	$return['params']=array('isbao'=>-1,'paytype'=>-1,'sex'=>-1,'xueli'=>-1,'pid'=>intval($_RQ['pid']),'cid'=>$cid,'sid'=>$sid);
	$return['setting']=$setting;
	$return['member']=pdo_get('core_members',array('id'=>$_SESSION['uid'],'uniacid'=>$_SESSION['uniacid']),array('createtime','credit1','credit2','mobile','avatar','nickname'));
	$return['notices']=pdo_getall('core_account_article',array('uniacid'=>$_SESSION['uniacid'],'status'=>'1'),'','id desc');
	$return['pcd']=$this->session('pcd')?:array('city'=>'');
	$return['xueli_type']=$this->xueli_type;
	$return['job_paytype']=$this->job_paytype;
	$return['job_isbao']=$this->job_isbao;
	set_html('title',$setting['title']?$setting['title'] :'灵活用工');
	exi($return);
}
?>